chore: 精简 agent skill 体系为单会话工作流 - #52
Merged
Merged
Conversation
YoloMao
force-pushed
the
chore/streamline-agent-skills
branch
from
August 17, 2026 03:27
8c24133 to
ff15ed0
Compare
Collaborator
Author
|
本 PR 已按主题拆分:手表(wearable)设备类型支持与 |
YoloMao
force-pushed
the
chore/streamline-agent-skills
branch
from
August 17, 2026 03:46
ff15ed0 to
9e303ee
Compare
原有的 agent 体系依赖 subagent 编排(sdk-code-review / subagent-driven-development / plan-document-review / receiving-code-review 四个 skill + code-reviewer、spec-reviewer、 engineering-harmonyos-sdk-engineer 三个 agent 定义 + SessionStart hook),实际使用中 维护成本高于收益:多层 subagent 转发丢上下文,"Planning Gate" 这类抽象概念散落在多个 skill 里互相引用,改一处要同步改四处。 其中 session-start.sh 是真正的常驻开销:它把 using-growingio-sdk-skills 的全文 (14.4KB)包在 <EXTREMELY-IMPORTANT> 里注入,matcher 为 startup|clear|compact, 每次 auto-compact 后都会重新注入一遍。 改为单会话工作流: - 删除 subagent 编排相关 skill 与 .claude/agents 定义、session-start.sh hook - 审查环节由 subagent 改为对照 docs/sdk-review-checklist.md 自查(新增), 开发流程图并入该文档,替代 docs/agents-skills-flow.md - 剩余 skill 中移除 "Planning Gate" 抽象,直接写明触发条件(改动 ≥3 文件或公开 API 变更) - 剩余 skill 的「关联 skill」段统一为「使用方式:」,去掉 "调度 subagent:无" 字段 与「控制器」「BLOCKED 升级」「subagent-driven-development」等已删概念的悬空引用 - AGENTS.md / docs/sdk-engineering-guide.md 补充自查清单索引并写明触发条件 - .gitignore 补 .DS_Store 规则 不单独维护 skill 清单文档:harness 已自动注入各 skill 的 name + description, 再写一份表格只会形成第二个需要同步的数据源。 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
YoloMao
force-pushed
the
chore/streamline-agent-skills
branch
from
August 17, 2026 05:56
9e303ee to
8884ef2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
精简 agent skill 体系为单会话工作流
现有 agent 体系依赖 subagent 编排:4 个编排类 skill + 3 个
.claude/agents定义 + 一个 SessionStart hook。实际使用中维护成本高于收益:多层 subagent 转发丢上下文;"Planning Gate" 抽象散落在多个 skill 中互相引用,改一处要同步改四处;prompt 模板与 skill 正文大量重复。真正的常驻开销在 hook
session-start.sh把using-growingio-sdk-skills/SKILL.md全文 14.4KB 包在<EXTREMELY-IMPORTANT>里,通过additionalContext注入,matcher 为startup|clear|compact—— 每次 auto-compact 后都会重新注入一遍。长会话里这是反复计费的成本,也是本次精简省下的大头。作为对比:保留的 11 个 skill 常驻成本只有各自的
description,合计 2475 字节;72KB 正文只在被触发时才读入。变更清单
sdk-code-review/subagent-driven-development/plan-document-review/receiving-code-review/using-growingio-sdk-skills.claude/agents/*.md、.claude/hooks/session-start.sh,并清理settings.json的agent键与SessionStart配置docs/sdk-review-checklist.mddocs/agents-skills-flow.md(-326 行)AGENTS.md/docs/sdk-engineering-guide.md各加一条,并写明触发条件("提 PR 前必读"),与既有 lazy-load 条目格式对齐.gitignore.DS_Store规则刻意不做的事
不单独维护 skill 清单文档。 harness 已自动把各 skill 的
name+description注入上下文,再写一份表格只会形成第二个需要同步的数据源 —— 正是本 PR 要消除的那类问题。流程图(唯一不可从 skill description 推导出的信息)并入了sdk-review-checklist.md。PreToolUse的混淆规则校验 hook 保留:它是构建期硬校验,不是上下文注入,无常驻 token 成本。不涉及 SDK 源码。
🤖 Generated with Claude Code